<div class="tableinfo">
    <div class="tableHeader">
        <p>Thông tin đề án</p>
    </div>
    
    
    <table border ="0" cellspacing ="0" cellpadding ="0">
        <tr style="background: silver; font-weight: bold;">
         
            <td>Mã Phòng</td>
            <td>Tên phòng</td>
            <td>Mã TRGP</td>
            <td>Ngày Nhận Chức</td>
            <td >Ghi chú</td>
                
        </tr>
        
        <?php 
            include "../controller/load_phongban.php";
            
            while ($row = mysql_fetch_assoc($phongban)){
               
            //for($l = 1; $l<=15; $l++){
            echo " <tr>
         
            <td>".$row['MaPhong']."</td>
            <td>".$row['TenPhong']."</td>
            <td>".$row['MaTRGP']."</td>
            <td>".$row['NgayNhanChuc']."</td>
            <td>".$row['GhiChu']."</td>
            
            </tr>" ;
            //}
            }
        ?>
    </table>

           <ul class="phantrang">
            <?php
               //echo $so; 
              if($page >1){
                $sau = $vitri + $hienthi;
                $truoc = $vitri - $hienthi;
                $tranght= ($vitri/$hienthi)+1;

                //nut pre                
                if($tranght !=1){
                    echo "<li><a href='../view/phongban.php?vitri=".$truoc."'>Trước</a></li>";
                }
                
                //so trang
                for($i=1; $i<=$page; $i++ ){
                    if($tranght != $i){
                        echo "<li><a href='../view/phongban.php?vitri=".$hienthi*($i-1)."'>$i</a></li>"; 
                    }else{
                        echo "<li class='hientai'><a href=''>$i</a></li>";
                    } 
                }
                
                
                //nut next
                if($tranght != $page){
                    echo "<li><a href='../view/phongban.php?vitri=".$sau."'>Sau</a></li>";
                }
              }  
            ?>
             
        </ul>     
    
</div>
